package cn.myjerry.memento;

public class Emp {
	private String Name;
	private int Age;
	private double Salary;
	
	public EmpMemento memento() {
		return new EmpMemento(this);
	}
	
	public void recovery(EmpMemento empMemento) {
		this.Name = empMemento.getName();
		this.Age = empMemento.getAge();
		this.Salary = empMemento.getSalary();
	}
	
	public Emp(String name, int age, double salary) {
		super();
		Name = name;
		Age = age;
		Salary = salary;
	}

	public String getName() {
		return Name;
	}
	public void setName(String name) {
		Name = name;
	}
	public int getAge() {
		return Age;
	}
	public void setAge(int age) {
		Age = age;
	}
	public double getSalary() {
		return Salary;
	}
	public void setSalary(double salary) {
		Salary = salary;
	}
}
